<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>


    fn1=function (age){

        this.age=age;

    }

   fn1.prototype={
        name:'张三'
   }

    const aaa=new fn1(18);

    console.log(aaa.name);

    console.log(aaa.age);






    (function (e){

        jQuery = function( selector, context ) {

            return new jQuery.fn.init( selector, context );
        }


        jQuery.fn = jQuery.prototype = {

            fun:function (){
                console.log('我是fun方法')
            },

            init:function (a,b){
                console.log(a);
                console.log(b)

                return this    //  返回  调用者
            }
        }


        jQuery.fn.init.prototype = jQuery.fn;

        //挂载
        e.jQuery = e.$ = jQuery;
    })(window)
</script>


<script>

    jQuery(1,2).fun();



</script>

</body>
</html>